﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XW.Core;

namespace XW.Data;

/// <summary>
/// 数据字典分组表
/// </summary>
[SugarTable(null, TableDescription = "数据字典分组表")]
public class SysDicGrp : EntityBase
{
    /// <summary>
    /// 标题
    /// </summary>
    [SugarColumn(ColumnDescription = "标题", Length = 50, IsNullable = true)]
    public virtual string Title { get; set; }

    /// <summary>
    /// 分组Key
    /// </summary>
    [SugarColumn(ColumnDescription = "分组Key", Length = 20, IsNullable = true)]
    public virtual string GrpKey { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnDescription = "备注", Length = 200, IsNullable = true)]
    public virtual string Remark { get; set; }


    /// <summary>
    /// 是否显示 1 是 0 否
    /// </summary>
    [SugarColumn(ColumnDescription = "是否显示 1 是 0 否", IsNullable = true, DefaultValue = "1")]
    public virtual int IsShow { get; set; }


    /// <summary>
    /// 排序
    /// </summary>
    [SugarColumn(ColumnDescription = "排序", IsNullable = true, DefaultValue = "0")]
    public virtual int Sort { get; set; }
}


/// <summary>
/// 数据字典表
/// </summary>
[SugarTable(null, TableDescription = "数据字典表")]
public class SysDic : EntityBase
{
    /// <summary>
    /// 分组Id
    /// </summary>
    [SugarColumn(ColumnDescription = "分组Id", IsNullable = true)]
    public long DicGrpId { get; set; }
    /// <summary>
    /// 标题
    /// </summary>
    [SugarColumn(ColumnDescription = "标题", Length = 50, IsNullable = true)]
    public virtual string DicTitle { get; set; }
    /// <summary>
    /// 值
    /// </summary>
    [SugarColumn(ColumnDescription = "值", Length = 200, IsNullable = true)]
    public virtual string DicValue { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnDescription = "备注", Length = 200, IsNullable = true)]
    public virtual string Remark { get; set; }


    /// <summary>
    /// 是否显示 1 是 0 否
    /// </summary>
    [SugarColumn(ColumnDescription = "是否显示 1 是 0 否", IsNullable = true, DefaultValue = "1")]
    public virtual int IsShow { get; set; }


    /// <summary>
    /// 排序
    /// </summary>
    [SugarColumn(ColumnDescription = "排序", IsNullable = true, DefaultValue = "0")]
    public virtual int Sort { get; set; }

    /// <summary>
    /// 状态 0 启用 1 禁用
    /// </summary>
    [SugarColumn(ColumnDescription = "状态 0 启用 1 禁用", IsNullable = true, DefaultValue = "0")]
    public virtual int Status { get; set; }
}
